﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ContractHabitationForm.aspx.cs" Inherits="App_Input_ContractHabitationForm"
    Title="会员合同" %>
<%@ Import Namespace="Shpm.App.Commons.Utils" %>
<%@ Import Namespace="Shpm.App.Commons.Db.Beans.Inp" %>
<%@ Register TagPrefix="shpm" TagName="TipBar" Src ="~/App/Input/SaleProcessTipBar.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript">
        function settext(id,val){
            var obj = window.document.getElementById(id);

            obj.value=val;
            
            if( obj.onchange!=null ) {
                obj.onchange();
            }
        }

        function popup(){
            window.open('../Commons/RoomSearchForm.aspx?tID=<%=txtApartmentNo.ClientID%>','RoomSearchForm','scrollbars,resizable')
        }
    </script>

    <div id="container">
        <div id="title">
            <ul>
                <li id="Li1"  style="display:none;">
                    <asp:LinkButton ID="LinkButton8" OnCommand="lnkTab_Command" CommandName="btn0" runat="server" Enabled="false" Width="105px"><span>新建销售档案</span></asp:LinkButton>
                </li>
                <li id="Li2">
                    <asp:LinkButton ID="LinkButton9" OnCommand="lnkTab_Command" CommandName="btn1" runat="server"><span>销售记录</span></asp:LinkButton>
                </li>
                <li id="Li4">
                    <asp:LinkButton ID="LinkButton11" OnCommand="lnkTab_Command" CommandName="btn3" runat="server" Width="95px"
                        ><span>权益人管理</span></asp:LinkButton>
                </li>
                <li id="Li3">
                    <asp:LinkButton ID="LinkButton10" OnCommand="lnkTab_Command" CommandName="btn2" runat="server"><span>会员管理</span></asp:LinkButton>
                </li>
                <li id="Li6">
                    <asp:LinkButton ID="LinkButton2" OnCommand="lnkTab_Command" CommandName="btn6" runat="server" Width="105px"><span>入住资格审核</span></asp:LinkButton>
                </li>
                <li id="tag5">
                    <asp:LinkButton ID="LinkButton5" OnCommand="lnkTab_Command" CommandName="btn4" runat="server" CssClass="selectli" OnClientClick="return false;"><span class="selectspan">会员入住</span></asp:LinkButton>
                </li>
            </ul>
            <ul>
                <li id="Li8">
                    <asp:LinkButton ID="LinkButton3_4" OnCommand="lnkTab_Command" CommandName="btn5_1"
                               runat="server" CssClass="selectli" OnClientClick="return false;"><span class="selectspan">会员合同</span>
                    </asp:LinkButton>
                </li>
                <li id="Li5">
                    <asp:LinkButton ID="LinkButton1" OnCommand="lnkTab_Command" CommandName="btn5_2"
                               runat="server"><span>会员移交</span>
                    </asp:LinkButton>
                </li>
            </ul>
        </div>
        <div id="content" class="content1">
            <shpm:TipBar runat="server" ID="tipBar" />
            <table width="100%">
                <tr id="MasterMember" runat="server">
                    <td align="center">
                        <table class="table_border_line">
                            <tr>
                                <th align="left" colspan="6" style="text-align: left; height: 15px;">

                                    <script language="javascript">
                                (new TitleBar('MasterMemberBar', '主会员信息')).showBar();
                                    </script>

                                </th>
                            </tr>
                        </table>
                        <table class="table_border_line" style="background: ffffff">
                            <tr>
                                <td style="width: 16px; height: 26px;" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    会员编号：</td>
                                <td class="" id="MasterMemberId" runat="server" style="height: 26px">
                                    --
                                </td>
                                <td class="" id="MasterMemberIdEdit" runat="server" style="height: 26px">
                                    &nbsp;<asp:Label ID="lblMasterMemberNoId" runat="server" ></asp:Label>
                                    <asp:TextBox ID="MasterMemberNoId" runat="server" MaxLength="3" Width="50px" /></td>
                                <td colspan="3" align="right" class="" style="height: 26px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    姓名：</td>
                                <td class="" id="MasterMemberName" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    性别：</td>
                                <td class="" id="MasterMemberSex" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    身份证：</td>
                                <td class="" id="MasterMemberIdCard" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    一卡通编号：</td>

                                <td class="" id="MasterMemberPosView" runat="server">
                                    --
                                </td>
                                <td class="" id="MasterMemberPosEdit" runat="server">
                                    <asp:TextBox ID="MasterMemberPosId" runat="server" MaxLength="20" />
                                </td>

                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="AccessoryMember" runat="server">
                    <td align="center">
                        <table class="table_border_line">
                            <tr>
                                <th align="left" colspan="6" style="text-align: left;">

                                    <script language="javascript">
                                (new TitleBar('SecondaryMemberBar', '副会员信息')).showBar();
                                    </script>

                                </th>
                            </tr>
                        </table>
                        <table class="table_border_line" style="background: ffffff">
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    会员编号：</td>
                                <td class="" id="SecondaryMemberId" runat="server">
                                    --
                                </td>
                                <td class="" id="SecondaryMemberIdEdit" runat="server">
                                    &nbsp;<asp:Label ID="lblSecondaryMemberNoId" runat="server"></asp:Label>
                                    <asp:TextBox ID="SecondaryMemberNoId" runat="server" MaxLength="3" Width="50px" /></td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    姓名：</td>
                                <td class="" id="SecondaryMemberName" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    性别：</td>
                                <td class="" id="SecondaryMemberSex" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    身份证：</td>
                                <td class="" id="SecondaryMemberIdCard" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                
                                <td class="" style="width: 128px; height: 26px">
                                    一卡通编号：</td>

                                <td class="" id="SecondaryMemberPosView" runat="server">
                                    --
                                </td>
                                <td class="" id="SecondaryMemberPosEdit" runat="server">
                                    <asp:TextBox ID="SecondaryMemberPosId" runat="server" MaxLength="20" />
                                </td>
                                
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="AccompanyMember" runat="server">
                    <td align="center">
                        <table class="table_border_line">
                            <tr>
                                <th align="left" colspan="6" style="text-align: left;">

                                    <script language="javascript">
                                (new TitleBar('AccompanyMemberBar', '陪住人信息')).showBar();
                                    </script>

                                </th>
                            </tr>
                        </table>
                        <table class="table_border_line" style="background: ffffff">
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    会员编号：</td>
                                <td class="" id="AccompanyId" runat="server">
                                    --
                                </td>
                                <td class="" id="AccompanyIdEdit" runat="server">
                                    &nbsp;<asp:Label ID="lblAccompanyNoId" runat="server"></asp:Label>
                                    <asp:TextBox ID="AccompanyNoId" runat="server" MaxLength="3" Width="50px" /></td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    姓名：</td>
                                <td class="" id="AccompanyMemberName" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    性别：</td>
                                <td class="" id="AccompanyMemberSex" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    身份证：</td>
                                <td class="" id="AccompanyMemberIdCard" runat="server">
                                    --
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    一卡通编号：</td>
                                    
                                <td class="" id="AccompanyPosView" runat="server">
                                    --
                                </td>
                                <td class="" id="AccompanyPosEdit" runat="server">
                                    <asp:TextBox ID="AccompanyPosId" runat="server" MaxLength="20" />
                                </td>
                                
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table class="table_border_line">
                            <tr>
                                <th align="left" colspan="6" style="text-align: left;">

                                    <script language="javascript">
                                (new TitleBar('SearchBar', '入住信息')).showBar();
                                    </script>

                                </th>
                            </tr>
                        </table>
                        <table class="table_border_line" style="background: ffffff">
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    房间编号：</td>
                                <td class="" id="LabMemberNo" runat="server">
                                    <span id="labApartmentNoEdit" runat="server">
                                        <asp:TextBox ID="txtApartmentNo" runat="server" AutoPostBack="true" />
                                        <a href="#" onclick="javascript:popup();">
                                            <img src="../../images/search.jpg" border="0" /></a> </span>
                                    <asp:Label ID="labApartmentNoDisplay" runat="server" />
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 16px" class="">
                                    &nbsp;</td>
                                <td class="" style="width: 128px; height: 26px">
                                    标准配置：</td>
                                <td class="" id="Td1" runat="server">
                                    <asp:Table CssClass="GridView_table" ID="TblItem" runat="server" EnableViewState="true">
                                        <asp:TableRow>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue" Width="160">设施名称</asp:TableHeaderCell>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue" Width="120">品牌</asp:TableHeaderCell>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue" Width="120">型号</asp:TableHeaderCell>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue" Width="80">数量</asp:TableHeaderCell>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue">备注</asp:TableHeaderCell>
                                            <asp:TableHeaderCell CssClass="GridView_head_grayblue" Width="30">确认</asp:TableHeaderCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                    <!-- table class="table_border_line">
                                        <tr>
                                            <td><b>设施名称</b></td>
                                            <td><b>品牌</b></td>
                                            <td><b>型号</b></td>
                                            <td><b>数量</b></td>
                                            <td><b>备注</b></td>
                                            <td><b>确认</b></td>
                                        </tr>
                                        <tr>
                                            <td>鞋柜</td>
                                            <td>INTEL</td>
                                            <td>P4</td>
                                            <td><asp:TextBox ID="ItemAcount" runat="server" MaxLength="5" Columns="5" /></td>
                                            <td>双核</td>
                                            <td><asp:CheckBox ID="chk1" runat="server" /></td>
                                        </tr>
                                        <tr>
                                            <td>餐桌</td>
                                            <td>INTEL</td>
                                            <td>P4</td>
                                            <td><asp:TextBox ID="TextBox1" runat="server" MaxLength="5" Columns="5" /></td>
                                            <td>双核</td>
                                            <td><asp:CheckBox ID="CheckBox1" runat="server" /></td>
                                        </tr>
                                        <tr>
                                            <td>餐椅</td>
                                            <td>INTEL</td>
                                            <td>P4</td>
                                            <td><asp:TextBox ID="TextBox2" runat="server" MaxLength="5" Columns="5" /></td>
                                            <td>双核</td>
                                            <td><asp:CheckBox ID="CheckBox2" runat="server" /></td>
                                        </tr>
                                    </table -->
                                </td>
                                <td colspan="3" align="right" class="">
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                        <tr>
                            <td>
                                <table class="table_border_line">
                                    <tr>
                                        <th align="left" colspan="6" style="text-align: left;">

                                            <script language="javascript">
                                (new TitleBar('SearchBar', '修订履历')).showBar();
                                            </script>

                                        </th>
                                    </tr>
                                </table>
                                <table class="table_border_line" style="background: ffffff">
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td style="width: 48px; padding-left: 16px">
                                <%# ((InpContractHabitationBean)Container.DataItem).HabitationId %>
                                .
                            </td>
                            <td style="width: 130px">
                                <asp:LinkButton ID="lnkBtnEditHistory" runat="server" OnCommand="lnkEditHistory_Command"
                                    CommandArgument="<%# ((InpContractHabitationBean)Container.DataItem).HabitationId %>"
                                    Text="<%# (((InpContractHabitationBean)Container.DataItem).SignDate==null)?string.Empty:DateUtils.convertToString(((InpContractHabitationBean)Container.DataItem).SignDate.Value) %>"
                                    Enabled="<%# (((InpContractHabitationBean)Container.DataItem).HabitationId!=this.habitationId) %>"></asp:LinkButton>
                            </td>
                            <td>
                                <%# (((InpContractHabitationBean)Container.DataItem).DelDate==null)?"最新合同":"履历合同" %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table> </td> </tr>
                    </FooterTemplate>
                </asp:Repeater>
                <tr>
                    <td align="center">
                        <asp:Button ID="btnOk" runat="server" Text="保存" OnClientClick="return confirm('是否确认登记入住合同？')"
                            CssClass="button" OnClick="btnOk_Click" Width="75px" />
                        &nbsp; &nbsp;
                        <asp:Button ID="btnNew" runat="server" Text="修改" CssClass="button" OnClick="btnNew_Click" Width="75px" />
                        &nbsp; &nbsp;
                        <asp:Button ID="btnDel" runat="server" Text="删除" CssClass="button" OnClick="btnDel_Click"
                            Visible="false" Width="75px" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
